@isTest
public class  BatchTestAY{
    static testMethod void test_year() {

        MZ_Author__c author= new MZ_Author__c(Name='Unittest');
        insert author;
        MZ_Album__c album= new MZ_Album__c (Name='albumUnitTest',MZ_Year__c=2000,MZ_AuthorPerformer__c=author.id);
        insert album;
        MZ_Track__c track=new MZ_Track__c(Name='Testowanie' ,MZ_YearTrack__c='3000',MZ_Bitrate__c='120',MZ_Author_ref__c=NULL ,MZ_Album_ref__c=album.id );
        insert track;
        
        
       Test.startTest();

        Database.executeBatch(new batchClass() );
       Test.stopTest();
        MZ_Track__c greattrack=[Select MZ_YearTrack__c , MZ_Album_ref__r.MZ_AuthorPerformer__r.Name FROM MZ_Track__c];
        system.AssertEquals('Unittest',(String)greattrack.MZ_Album_ref__r.MZ_AuthorPerformer__r.Name );
        system.AssertEquals('2000',(String)greattrack.MZ_YearTrack__c );
    }
}